package com.woniu.order.util;

import com.woniu.order.bean.TOrder;

import com.woniu.order.service.ITOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


import java.util.List;

@Component
public class  IdUtil {
    @Autowired
    private ITOrderService itOrderService;
    public Integer getAId(){
        List<TOrder> list = itOrderService.list();
        Integer orderId = list.get(list.size() - 1).getOrderId();
        orderId+=1;
        return orderId;
    }



}
